
mars3d.widget.bindClass(mars3d.widget.BaseWidget.extend({
    options: {

    },
    //初始化[仅执行1次]
    create: function () {
        //对应的模型，实际项目中可以注释，一直打开模型
        // this.layerWork = this.viewer.mars.getLayer(203012, 'id');

        //添加参考三维模型  
        this.layerWork = mars3d.layer.createLayer({
            "type": "3dtiles", 
            "url": "http://127.0.0.1:5503/data/export_zgc_all/tileset.json",
            "offset": { "z": 155.5 },
            "visible": true
        }, viewer);

        this.layerWorkDT = mars3d.layer.createLayer({
            "type": "3dtiles", 
            "url": "http://127.0.0.1:5503/data/export_zgc_all/lab_a_0_0_0.json",
            "classificationType": Cesium.ClassificationType.CESIUM_3D_TILE,
            "style": {
                "color": "rgba(255, 255, 255, 0.5)"
            },
            "showMoveFeature": true,
            "moveFeatureColor": "rgba(0, 255, 0, 0.5)",
            "popup": "all",

            "visible": true
        }, viewer);

    },
    //打开激活
    activate: function () { 

        if (this.layerWork) {
            this.layerWork.setVisible(true);
        } 
        if (this.layerWorkDT) {
            this.layerWorkDT.setVisible(true);
        } 
    },
    //关闭释放
    disable: function () {


        if (this.layerWork) {
            this.layerWork.setVisible(false);
        } 
        if (this.layerWorkDT) {
            this.layerWorkDT.setVisible(false);
        } 

    },





}));

